<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Formula (POI API Documentation)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.poi.ss.formula.Formula class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="Formula (POI API Documentation)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Formula.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/ExternSheetReferenceToken.html" title="interface in org.apache.poi.ss.formula"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/FormulaParseException.html" title="class in org.apache.poi.ss.formula"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/poi/ss/formula/Formula.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Formula.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.poi.ss.formula</FONT>
<BR>
Class Formula</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.poi.ss.formula.Formula</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Formula</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Encapsulates an encoded formula token array.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Josh Micich</DD>
</DL>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#copy()">copy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#create(org.apache.poi.ss.formula.ptg.Ptg[])">create</A></B>(<A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[]&nbsp;ptgs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula"><CODE>Formula</CODE></A> object from a supplied <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg"><CODE>Ptg</CODE></A> array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#getEncodedSize()">getEncodedSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#getEncodedTokenSize()">getEncodedTokenSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is often used when the formula length does not appear immediately before
 the encoded token data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/poi/ss/util/CellReference.html" title="class in org.apache.poi.ss.util">CellReference</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#getExpReference()">getExpReference</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the locator for the corresponding <A HREF="../../../../../org/apache/poi/hssf/record/SharedFormulaRecord.html" title="class in org.apache.poi.hssf.record"><CODE>SharedFormulaRecord</CODE></A>,
 <A HREF="../../../../../org/apache/poi/hssf/record/ArrayRecord.html" title="class in org.apache.poi.hssf.record"><CODE>ArrayRecord</CODE></A> or <A HREF="../../../../../org/apache/poi/hssf/record/TableRecord.html" title="class in org.apache.poi.hssf.record"><CODE>TableRecord</CODE></A>
 if this formula belongs to such a grouping.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#getTokens()">getTokens</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#getTokens(org.apache.poi.ss.formula.Formula)">getTokens</A></B>(<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A>&nbsp;formula)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg"><CODE>Ptg</CODE></A> array from the supplied <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula"><CODE>Formula</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#isSame(org.apache.poi.ss.formula.Formula)">isSame</A></B>(<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A>&nbsp;other)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#read(int, org.apache.poi.util.LittleEndianInput)">read</A></B>(int&nbsp;encodedTokenLen,
     <A HREF="../../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</A>&nbsp;in)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#read(int, org.apache.poi.util.LittleEndianInput, int)"><CODE>read(int, LittleEndianInput, int)</CODE></A></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#read(int, org.apache.poi.util.LittleEndianInput, int)">read</A></B>(int&nbsp;encodedTokenLen,
     <A HREF="../../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</A>&nbsp;in,
     int&nbsp;totalEncodedLen)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When there are no array constants present, <tt>encodedTokenLen</tt>==<tt>totalEncodedLen</tt></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#serialize(org.apache.poi.util.LittleEndianOutput)">serialize</A></B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes  The formula encoding is includes:
 
 ushort tokenDataLen
 tokenData
 arrayConstantData (if present)
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#serializeArrayConstantData(org.apache.poi.util.LittleEndianOutput)">serializeArrayConstantData</A></B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#serializeTokens(org.apache.poi.util.LittleEndianOutput)">serializeTokens</A></B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="read(int, org.apache.poi.util.LittleEndianInput)"><!-- --></A><H3>
read</H3>
<PRE>
public static <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A> <B>read</B>(int&nbsp;encodedTokenLen,
                           <A HREF="../../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</A>&nbsp;in)</PRE>
<DL>
<DD>Convenience method for <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html#read(int, org.apache.poi.util.LittleEndianInput, int)"><CODE>read(int, LittleEndianInput, int)</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="read(int, org.apache.poi.util.LittleEndianInput, int)"><!-- --></A><H3>
read</H3>
<PRE>
public static <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A> <B>read</B>(int&nbsp;encodedTokenLen,
                           <A HREF="../../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</A>&nbsp;in,
                           int&nbsp;totalEncodedLen)</PRE>
<DL>
<DD>When there are no array constants present, <tt>encodedTokenLen</tt>==<tt>totalEncodedLen</tt>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>encodedTokenLen</CODE> - number of bytes in the stream taken by the plain formula tokens<DD><CODE>totalEncodedLen</CODE> - the total number of bytes in the formula (includes trailing encoding
 for array constants, but does not include 2 bytes for initial <tt>ushort encodedTokenLen</tt> field.
<DT><B>Returns:</B><DD>A new formula object as read from the stream.  Possibly empty, never <code>null</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="getTokens()"><!-- --></A><H3>
getTokens</H3>
<PRE>
public <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[] <B>getTokens</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="serialize(org.apache.poi.util.LittleEndianOutput)"><!-- --></A><H3>
serialize</H3>
<PRE>
public void <B>serialize</B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</PRE>
<DL>
<DD>Writes  The formula encoding is includes:
 <ul>
 <li>ushort tokenDataLen</li>
 <li>tokenData</li>
 <li>arrayConstantData (if present)</li>
 </ul>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="serializeTokens(org.apache.poi.util.LittleEndianOutput)"><!-- --></A><H3>
serializeTokens</H3>
<PRE>
public void <B>serializeTokens</B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="serializeArrayConstantData(org.apache.poi.util.LittleEndianOutput)"><!-- --></A><H3>
serializeArrayConstantData</H3>
<PRE>
public void <B>serializeArrayConstantData</B>(<A HREF="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</A>&nbsp;out)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getEncodedSize()"><!-- --></A><H3>
getEncodedSize</H3>
<PRE>
public int <B>getEncodedSize</B>()</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>total formula encoding length.  The formula encoding includes:
 <ul>
 <li>ushort tokenDataLen</li>
 <li>tokenData</li>
 <li>arrayConstantData (optional)</li>
 </ul>
 Note - this value is different to <tt>tokenDataLength</tt></DL>
</DD>
</DL>
<HR>

<A NAME="getEncodedTokenSize()"><!-- --></A><H3>
getEncodedTokenSize</H3>
<PRE>
public int <B>getEncodedTokenSize</B>()</PRE>
<DL>
<DD>This method is often used when the formula length does not appear immediately before
 the encoded token data.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the encoded length of the plain formula tokens.  This does <em>not</em> include
 the leading ushort field, nor any trailing array constant data.</DL>
</DD>
</DL>
<HR>

<A NAME="create(org.apache.poi.ss.formula.ptg.Ptg[])"><!-- --></A><H3>
create</H3>
<PRE>
public static <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A> <B>create</B>(<A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[]&nbsp;ptgs)</PRE>
<DL>
<DD>Creates a <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula"><CODE>Formula</CODE></A> object from a supplied <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg"><CODE>Ptg</CODE></A> array.
 Handles <code>null</code>s OK.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ptgs</CODE> - may be <code>null</code>
<DT><B>Returns:</B><DD>Never <code>null</code> (Possibly empty if the supplied <tt>ptgs</tt> is <code>null</code>)</DL>
</DD>
</DL>
<HR>

<A NAME="getTokens(org.apache.poi.ss.formula.Formula)"><!-- --></A><H3>
getTokens</H3>
<PRE>
public static <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg">Ptg</A>[] <B>getTokens</B>(<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A>&nbsp;formula)</PRE>
<DL>
<DD>Gets the <A HREF="../../../../../org/apache/poi/ss/formula/ptg/Ptg.html" title="class in org.apache.poi.ss.formula.ptg"><CODE>Ptg</CODE></A> array from the supplied <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula"><CODE>Formula</CODE></A>.
 Handles <code>null</code>s OK.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>formula</CODE> - may be <code>null</code>
<DT><B>Returns:</B><DD>possibly <code>null</code> (if the supplied <tt>formula</tt> is <code>null</code>)</DL>
</DD>
</DL>
<HR>

<A NAME="copy()"><!-- --></A><H3>
copy</H3>
<PRE>
public <A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A> <B>copy</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getExpReference()"><!-- --></A><H3>
getExpReference</H3>
<PRE>
public <A HREF="../../../../../org/apache/poi/ss/util/CellReference.html" title="class in org.apache.poi.ss.util">CellReference</A> <B>getExpReference</B>()</PRE>
<DL>
<DD>Gets the locator for the corresponding <A HREF="../../../../../org/apache/poi/hssf/record/SharedFormulaRecord.html" title="class in org.apache.poi.hssf.record"><CODE>SharedFormulaRecord</CODE></A>,
 <A HREF="../../../../../org/apache/poi/hssf/record/ArrayRecord.html" title="class in org.apache.poi.hssf.record"><CODE>ArrayRecord</CODE></A> or <A HREF="../../../../../org/apache/poi/hssf/record/TableRecord.html" title="class in org.apache.poi.hssf.record"><CODE>TableRecord</CODE></A>
 if this formula belongs to such a grouping.  The <A HREF="../../../../../org/apache/poi/ss/util/CellReference.html" title="class in org.apache.poi.ss.util"><CODE>CellReference</CODE></A>
 returned by this method will  match the top left corner of the range of that grouping.
 The return value is usually not the same as the location of the cell containing this formula.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the firstRow & firstColumn of an array formula or shared formula that this formula
 belongs to.  <code>null</code> if this formula is not part of an array or shared formula.</DL>
</DD>
</DL>
<HR>

<A NAME="isSame(org.apache.poi.ss.formula.Formula)"><!-- --></A><H3>
isSame</H3>
<PRE>
public boolean <B>isSame</B>(<A HREF="../../../../../org/apache/poi/ss/formula/Formula.html" title="class in org.apache.poi.ss.formula">Formula</A>&nbsp;other)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Formula.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/ExternSheetReferenceToken.html" title="interface in org.apache.poi.ss.formula"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/poi/ss/formula/FormulaParseException.html" title="class in org.apache.poi.ss.formula"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/poi/ss/formula/Formula.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Formula.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            
</BODY>
</HTML>
